﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using OpenNETCF.GDIPlus;

namespace MobileCarManager.Mobile.Application
{
  public partial class MainForm : Form
  {
    GdiplusStartupInput _gdiInput = new GdiplusStartupInput();
    GdiplusStartupOutput _gdiOutput;
    IntPtr _gdiToken;
    private Controller _controller;

    public MainForm()
    {
      InitializeComponent();
      _controller = new Controller();
    }

    private void OnLoad(object sender, EventArgs e)
    {
      GpStatusPlus stat = NativeMethods.GdiplusStartup(out _gdiToken, _gdiInput, out _gdiOutput);
      _controller.Initialize(this);
    }

    private void OnClosing(object sender, CancelEventArgs e)
    {
      NativeMethods.GdiplusShutdown(_gdiToken);
    }
  }
}